package school30.ui.events;

import javax.microedition.lcdui.Canvas;

public class KeyEvent extends Event
{
    public static int KEY_NUM0 = Canvas.KEY_NUM0;
    public static int KEY_NUM1 = Canvas.KEY_NUM1;
    public static int KEY_NUM2 = Canvas.KEY_NUM2;
    public static int KEY_NUM3 = Canvas.KEY_NUM3;
    public static int KEY_NUM4 = Canvas.KEY_NUM4;
    public static int KEY_NUM5 = Canvas.KEY_NUM5;
    public static int KEY_NUM6 = Canvas.KEY_NUM6;
    public static int KEY_NUM7 = Canvas.KEY_NUM7;
    public static int KEY_NUM8 = Canvas.KEY_NUM8;
    public static int KEY_NUM9 = Canvas.KEY_NUM9;
    public static int KEY_STAR = Canvas.KEY_STAR;
    public static int KEY_POUND = Canvas.KEY_POUND;
    public static int KEY_UP = Canvas.UP;
    public static int KEY_DOWN = Canvas.DOWN;
    public static int KEY_LEFT = Canvas.LEFT;
    public static int KEY_RIGHT = Canvas.RIGHT;
    public static int KEY_CENTER = Canvas.FIRE;

    public static int KEY_SOFT_LEFT = Canvas.GAME_A;
    public static int KEY_SOFT_RIGHT = Canvas.GAME_B;
    public static int KEY_OK = Canvas.GAME_C;
    public static int KEY_CANCEL = Canvas.GAME_D;
    
    public static int TYPE_PRESSED = 1;
    public static int TYPE_RELEASED = 2;

    protected int code;
    protected int type;

    public KeyEvent(int code, int type) {
        this.code = code;
        this.type = type;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }
}
